<?php
include('../inc/data/dbfunc.php');
include('../inc/data/dbparam.php');
$conn = conn_mysql();
require_once('../inc/func/isLogin.php');

if ($_COOKIE['role'] != '1'){
    echo "js 
    <script>
        alert('您没有权限访问本页面!')
        window.history.go(-1)
    </script>
    ";
    exit;
}
?>

<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <link href="../inc/pic/index/logo.ico" rel="shortcut icon" type="image/x-icon">
    <link rel="stylesheet" href="../inc/css/reset.css">
    <link rel="stylesheet" href="../inc/css/index.css">
    <link rel="stylesheet" href="../inc/css/form.css">
    <title>暨南大学教务管理系统</title> 
    <script src="../inc/js/cookieFunc.js"></script>
    <script src="../inc/js/utils.js"></script>
    
</head>

<body>
    <header>
        <!-- top-nav -->
        <nav>
            <div>
                <!-- 左侧导航 -->
                <div class="left">
                    <ul>
                        <li><a href="javascript:;">报考学生</a></li>
                        <li><a href="javascript:;">在校生</a></li>
                        <li><a href="javascript:;">教职员</a></li>
                        <li><a href="javascript:;">家长|访客</a></li>
                        <li><a href="javascript:;">校友</a></li>
                    </ul>
                </div>
                <!-- 右侧导航 -->
                <div class="right">
                    <ul>
                    <li><a href=<?=isset($_COOKIE['uName']) ? '../logout.php' : '../login.php' ?>><?=isset($_COOKIE['uName']) ? '退出登录' : '登录' ?></a></li>
                        <li><a href="javascript:;">邮件</a></li>
                        <li><a href="javascript:;">通知</a></li>
                        <li><a href="javascript:;">会议</a></li>
                        <li><a href="javascript:;">网上服务大厅</a></li>
                        <li>|</li>
                        <li><a href="javascript:;">图书馆</a></li>
                        <li>|</li>
                        <li><a href="javascript:;">English<span></span></a></li>
                        <li><a href="javascript:;" title="搜索"></a></li>
                    </ul>
                </div>
            </div>
        </nav>
        <!-- logo -->
        <div class="logo">
            <div>
                <a href="../index.php" title="暨南大学"><img src="../inc/pic/index/logo2.svg" alt=""></a>
                <h1>教务管理系统</h1>
            </div>
        </div>
    </header>

    <!-- 菜单 -->
    <div id="menu-bar">
        <div id="menu">
            <ul class="nav">
                <li><a href="javascript:;">学校概况</a></li>
                <li><a href="javascript:;">组织机构</a></li>
                <li><a href="javascript:;">人才培养</a></li>
                <li><a href="javascript:;">教师成绩录入</a></li>
                <li><a href="javascript:;">教学任务查询</a></li>
                <li><a href="javascript:;">用户设置</a></li>
                <!-- 小船 -->
                <li><div id="ship"><img src="../inc/pic/index/top_ship.png" alt=""></div></li>
                
            </ul>
            <!-- 二级菜单 -->
            <div id="inside-menu">
                <div>

                    <!-- 左侧背景图片 -->
                    <div class="bg-color">

                    </div>
                    <!-- 右侧二级菜单 -->
                    <div class="inside-right">
                        <div class="img">
                            <img src="../inc/pic/index/zh.png" alt="">
                        </div>
                        <ul>
                            <li>学校简介</li>
                            <li>领导致辞</li>
                            <li>董事会</li>
                            <li>现任领导</li>
                            <li>大学章程</li>
                            <li>校训、校徽、校歌</li>
                            <li>暨南精神</li>
                            <li>学校风景</li>
                        </ul>
                        <ul>
                            <li>管理服务</li>
                            <li>院系设置</li>
                            <li>珠海校区</li>
                            <li>番禺校区</li>
                            <li>深圳校区</li>
                        </ul>
                        <ul>
                            <li>教师队伍</li>
                            <li>研究生教育</li>
                            <li>本科生教育</li>
                            <li>继续教育</li>
                            <li>华文教育</li>
                            <li>专业学位</li>
                            <li>创新创业教育</li>
                        </ul>
                        <ul>
                            <li>科研机构</li>
                            <li>学科建设</li>
                            <li>学术期刊</li>
                            <li>成果荟萃</li>
                        </ul>
                        <ul>
                            <li>国际交流</li>
                            <li>对外联络</li>
                            <li>校友会</li>
                        </ul>
                        <ul>
                            <li><a href="portrait.php">设置头像</a></li>
                            <li>生活服务</li>
                            <li>学生管理</li>
                            <li>学生发展</li>
                            <li>学生活动</li>
                        </ul>
                    </div>
                </div>
            </div>
        </div>
    </div>

    <div class="main-head">

        <!-- 已登录用户信息 -->
        <div class="user-info">
            <img src="<?=$_COOKIE['uImg']?>" alt="" class="user-icon">
            <span>您好!</span>
            <span><?=$_COOKIE['uName']?></span>
            <span>
                <?php 
                echo($_COOKIE['role'] == '0' ? "学号: {$_COOKIE['uId']}" : "工号:{$_COOKIE['uId']}");
                ?>
            </span>
            <span>系: <?=$_COOKIE['uDep']?></span>
        </div>
    
        <div>
            当前位置: 教师 - > 教学任务查询
        </div>
        
        <h3>查询条件</h3>
    
        <form action="" method="get">
            <p>
                学年: 
                <select name="" id="year">
                    
                </select>
                学期: 
                <select name="" id="term">
                    <option value="1">1</option>
                    <option value="2">2</option>
                </select>
                系: 
                <select name="" id="dep">
                    <?php
                    $sql = 'select dep_name,dep_id from huangcz_dep;';
                    // 学院名称
                    $depName = '';
                    // 学院id
                    $depId = 0;
                    $stmt = $conn->prepare($sql);
                    $stmt->bind_result($depName, $depId);
                    $stmt->execute();
                    $stmt->store_result();
                    while ($stmt->fetch()){
                        echo("<option value='{$depId}'>{$depName}</option>");
                    }
                    $stmt->free_result();
                    ?>
                    
                </select>
                <input type="button" id="depq" value="查询">
            </p>
    
            <p>
                按班级查询 > > 班级:
                <select name="" id="class">
                    
                </select> 
                <input type="button" id="classq" value="查询">
            </p>
    
            <p>
                按课程查询 > > 课程:
                <select name="" id="course">
                    
                </select> 
                <input type="button" id="courseq" value="查询">
            </p>
    
            <p>
                按教师查询 > > 教师:
                <select name="" id="te">
                    
                </select> 
                <input type="button" id="teq" value="查询">
            </p>
        </form>
    </div>


    <!-- 表格 -->
    <table class="table">
        <thead>
            <tr>
                <th>班级名称</th>
                <th>任课教师</th>
                <th>课程名称</th>
                <th>课程类型</th>
                <th>周课时</th>
                <th>起止周</th>
                <th>总课时</th>
                <th>考核方式</th>
            </tr>
        </thead>
        <tbody>
            
            
        </tbody>
    </table>
    <p style="text-align: center;font-size: 2rem;"></p>

</body>

<script src="../inc/js/jquery-3.6.0.min.js"></script>

<script src="../inc/js/ajax.js"></script>
<script src="../inc/js/index.js"></script>
<script src="../inc/js/tTask.js"></script>




</html>